home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-16 | 2.2 KB | 98 lines | [TEXT/MPS ] |
- //
- // File: SLBufSin.idl
- //
- // Contains: Interface for abstract random access sink class
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
-
- #ifndef SLBUFSIN_IDL
- #define SLBUFSIN_IDL
-
- #ifndef SLRANSIN_IDL
- #include "SLRanSin.idl"
- #endif
-
- //==============================================================================
- // Classes defined in this interface
- //==============================================================================
-
- interface FW_OBufferedSink;
-
-
- //==============================================================================
- // Classes used by this interface
- //==============================================================================
-
- interface FW_ORandomAccessSink;
-
-
- //==============================================================================
- // Types used by this interface
- //==============================================================================
-
-
- //========================================================================================
- // FW_ORandomAccessSink
- // This class wraps the random access sink passed to it with a buffer. The xxxPeakxxx
- // methods are turned on, using the buffer for peeking and the wrapped sink (shades of
- // Cristo!) for accessing the data.
- //========================================================================================
-
- interface FW_OBufferedSink : FW_ORandomAccessSink
- {
- void InitFromSink(in FW_ORandomAccessSink aSink, in long bufferCapacity);
- FW_ORandomAccessSink GetORandomAccessSink();
-
- void Flush();
- // Assure that all data has been written from the buffer and force the next
- // reads to fill the buffer.
-
- #ifdef __SOMIDL__
- implementation
- {
- functionprefix = "FW_OBufferedSink__";
-
- override:
- somInit,
- somUninit,
-
- GetReadableBytes,
- Read,
- GetWritableBytes,
- Write,
- GetLength,
- SetLength,
- GetPosition,
- SetPosition;
-
- releaseorder:
- InitFromSink,
- GetORandomAccessSink,
- Flush;
-
- majorversion = 1;
- minorversion = 0;
-
- passthru C_xh =
- "";
-
- passthru C_xih =
- "";
-
- #ifdef __PRIVATE__
- FW_ORandomAccessSink fWrappedSink;
- char* fBuffer;
- long fCapacity;
- long fInitialPosition;
- long fValidBytes;
- long fBytesWritten;
- long fType;
- #endif
- };
- #endif
- };
-
-
- #endif
-